(global.webpackJsonp = global.webpackJsonp || []).push([ [ "xg_o2o/shop/shoporder" ], {
    "2a8e": function(e, t, n) {
        "use strict";
        n.r(t);
        var r = n("e0b2"), o = n.n(r);
        for (var a in r) "default" !== a && function(e) {
            n.d(t, e, function() {
                return r[e];
            });
        }(a);
        t.default = o.a;
    },
    3813: function(e, t, n) {
        "use strict";
        n.d(t, "b", function() {
            return o;
        }), n.d(t, "c", function() {
            return a;
        }), n.d(t, "a", function() {
            return r;
        });
        var r = {
            gracePage: function() {
                return n.e("graceUI/components/gracePage").then(n.bind(null, "1915"));
            },
            graceFullLoading: function() {
                return n.e("graceUI/components/graceFullLoading").then(n.bind(null, "7669"));
            },
            graceEmptyNew: function() {
                return n.e("graceUI/components/graceEmptyNew").then(n.bind(null, "fb2f"));
            },
            divider: function() {
                return n.e("components/divider/divider").then(n.bind(null, "bdb7"));
            },
            graceLoading: function() {
                return n.e("graceUI/components/graceLoading").then(n.bind(null, "93a5"));
            }
        }, o = function() {
            var e = this, t = (e.$createElement, e._self._c, 0 !== e.menuList.length ? e.__map(e.orderItemList, function(t, n) {
                return {
                    $orig: e.__get_orig(t),
                    l0: e.__map(t, function(t, n) {
                        return {
                            $orig: e.__get_orig(t),
                            g0: t.goodslist.length > 1 ? t.goodslist[0][3].substring(0, 10) : null
                        };
                    })
                };
            }) : null);
            e.$mp.data = Object.assign({}, {
                $root: {
                    l1: t
                }
            });
        }, a = [];
    },
    "745e": function(e, t, n) {
        "use strict";
        n.r(t);
        var r = n("3813"), o = n("2a8e");
        for (var a in o) "default" !== a && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(a);
        var i = n("f0c5"), u = Object(i.a)(o.default, r.b, r.c, !1, null, null, null, !1, r.a, void 0);
        t.default = u.exports;
    },
    "8d3e": function(e, t, n) {
        "use strict";
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            n("4e1e"), t(n("66fd")), e(t(n("745e")).default);
        }).call(this, n("543d").createPage);
    },
    e0b2: function(e, t, n) {
        "use strict";
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var n = {
                data: function() {
                    return {
                        bgColor: "",
                        textColor: "",
                        graceFullLoading: !0,
                        currentCur: "order",
                        menuList: [],
                        bottomColor: "",
                        orderItemList: [ 0 ],
                        scrollLeft: "c0",
                        tabCurrentIndex: 0,
                        attach: "",
                        productList: [],
                        loadingData: [],
                        ordernum: 0,
                        tempItem: [],
                        clickNum: [],
                        page: [],
                        pageMore: [],
                        tempPageMore: 0,
                        userWxInfo: {},
                        topayservice: "去确认",
                        isRelease: 2,
                        iskefu: 2,
                        showBack: !1
                    };
                },
                onLoad: function(e) {
                    var t = getCurrentPages();
                    this.showBack = t.length > 1, e.ordernum && (this.tabCurrentIndex = e.ordernum, 
                    this.ordernum = e.ordernum), this.getOrderMenu();
                },
                onShow: function() {
                    1 == e.getStorageSync("shopOrderStatus") && (this.graceFullLoading = !0, this.tabCurrentIndex = 0, 
                    this.ordernum = 0, this.getOrderMenu());
                },
                methods: {
                    toShop: function() {
                        e.redirectTo({
                            url: "shop"
                        });
                    },
                    toShopOrder: function() {
                        e.redirectTo({
                            url: "shoporder"
                        });
                    },
                    tabClick: function(e) {
                        this.tabCurrentIndex = e.currentTarget.dataset.cindex;
                    },
                    changeTab: function(e) {
                        this.tabCurrentIndex = e.target.current;
                        var t = e.target.current;
                        this.scrollLeft = "c" + t, 0 == this.clickNum[t] && this.loadData(t, 1);
                    },
                    getOrderMenu: function() {
                        var t = this;
                        e.removeStorageSync("shopOrderStatus");
                        var n = this.$xSign.sign("u8creditmenu");
                        this.$xRequest.request({
                            url: "entry/wxapp/u8creditmenu",
                            data: {
                                xgsign: n
                            },
                            success: function(e) {
                                t.graceFullLoading = !1;
                                var n = JSON.parse(t.$Decrypt(e.data.data));
                                0 == e.data.errno && (t.attach = n.attach, t.bgColor = n.bgColor, t.textColor = n.textColor, 
                                t.bottomColor = n.color, t.menuList = n.menu, t.orderItemList = n.orderItemList, 
                                t.clickNum = n.clicknum, t.page = n.page, t.loadingData = n.loadType, t.pageMore = n.pageMore, 
                                t.attach = n.attach, t.isRelease = n.isrelease, t.scrollLeft = "c" + t.ordernum, 
                                t.iskefu = n.iskefu, t.loadData(t.ordernum, 1));
                            }
                        });
                    },
                    loadData: function(t, n) {
                        var r = this, o = this.menuList[t].status;
                        if (1 == this.pageMore[this.tabCurrentIndex]) return 1 == n && (this.graceFullLoading = !1), 
                        e.hideLoading(), !1;
                        1 == n ? this.graceFullLoading = !0 : e.showLoading({
                            title: "数据加载中",
                            mask: !0
                        }), setTimeout(function() {
                            var a = r.$xSign.sign("u8creditorder");
                            r.$xRequest.request({
                                url: "entry/wxapp/u8creditorder",
                                data: {
                                    page: r.page[t],
                                    status: o,
                                    xgsign: a
                                },
                                success: function(o) {
                                    1 == n && (r.graceFullLoading = !1), e.hideLoading();
                                    var a = JSON.parse(r.$Decrypt(o.data.data));
                                    if (0 == a.info) {
                                        if (a.itemlist) {
                                            var i = a.itemlist;
                                            r.tempItem = r.orderItemList[t].concat(a.itemlist), r.orderItemList[t] = r.tempItem, 
                                            i.length < a.pagesize ? (r.pageMore[r.tabCurrentIndex] = 1, r.loadingData.splice(r.tabCurrentIndex, 1, 2)) : r.loadingData.splice(r.tabCurrentIndex, 1, 0);
                                        }
                                        r.clickNum[t]++, r.page[t]++;
                                    } else r.tempPageMore = a.info, r.pageMore[t] = r.tempPageMore, r.loadingData.splice(r.tabCurrentIndex, 1, 2);
                                    a.total == r.orderItemList.length && (r.pageMore[r.tabCurrentIndex] = 1, r.loadingData.splice(r.tabCurrentIndex, 1, 2));
                                }
                            });
                        }, 300);
                    },
                    toPay: function(t, n) {
                        e.navigateTo({
                            url: "/xg_o2o/confirm/confirm?oid=" + t
                        });
                    },
                    toDetail: function(t) {
                        e.navigateTo({
                            url: "/xg_o2o/shop/shoporder_detail?oid=" + t
                        });
                    },
                    copyId: function(t) {
                        e.setClipboardData({
                            data: t,
                            success: function() {
                                console.log("success");
                            }
                        });
                    },
                    dateToStr: function(e) {
                        var t = 1e3 * parseInt(e), n = new Date(t), r = n.getFullYear(), o = n.getMonth() + 1, a = n.getDate(), i = n.getHours(), u = n.getMinutes();
                        return n.getSeconds(), r + "-" + (String(o).length > 1 ? o : "0" + o) + "-" + (String(a).length > 1 ? a : "0" + a) + " " + (String(i).length > 1 ? i : "0" + i) + ":" + (String(u).length > 1 ? u : "0" + u);
                    }
                },
                computed: {
                    style: function() {
                        var t = this.$systemInfo.info(), n = t.windowHeight - t.iPhoneXBottomHeightPx - t.statusBarHeight - 45 - e.upx2px(190);
                        return "height:".concat(n, "px;");
                    }
                }
            };
            t.default = n;
        }).call(this, n("543d").default);
    }
}, [ [ "8d3e", "common/runtime", "common/vendor" ] ] ]);